/*EFFECTS */
/*********************/
/* Effect 1: Reveal */
/*******************/

/* this is the basic effect already implemented in the standard side nav */

/***************************/
/* Effect 2: Slide on top */
/*************************/
[class*=-mc_slide_top] #tc-sn {
  z-index: 100;
}
.tc-sn-visible.sn-left-mc_slide_top #tc-page-wrap {
  left: 0 !important;
}
.tc-sn-visible.sn-right-mc_slide_top #tc-page-wrap {
  right: 0 !important;
}
.animating[class*=mc_slide_top] #tc-page-wrap{
  transform: translate3d(0,0,0) !important;
}

/* shared with the push effect */
.sn-left-mc_slide_top.sn-close #tc-sn, .sn-left-mc_slide_top #tc-sn,
.sn-left-mc_push.sn-close #tc-sn, .sn-left-mc_push #tc-sn {
  transform: translate3d(-100%, 0, 0);
}

.sn-right-mc_slide_top.sn-close #tc-sn, .sn-right-mc_slide_top #tc-sn,
.sn-right-mc_push.sn-close #tc-sn, .sn-right-mc_push #tc-sn {
  transform: translate3d(100%, 0, 0);
}

/*******************/
/* Effect 3: Push */
/*****************/
/* All rules shared with the above effects */

/************************/
/* Effect 4: Fall-Down */
/**********************/
[class*=-mc_fall_down] #tc-sn{
  transform: translate3d(0, -100%, 0);
  transition: ease-in-out 0.6s;
}
[class*=-mc_fall_down].sn-close #tc-sn {
  transform: translate3d(0, -100%, 0);
}

/**************************/
/* Effect 5: Slide-along */
/************************/

/* Shared with reverse-slide-out which is its contrary */
.sn-right-mc_slide_along.sn-close #tc-sn, .sn-right-mc_slide_along #tc-sn,
.sn-left-mc_rev_slide_out.sn-close #tc-sn, .sn-left-mc_rev_slide_out #tc-sn{
	transform: translate3d(+50%, 0, 0);
}

.sn-left-mc_slide_along.sn-close #tc-sn, .sn-left-mc_slide_along #tc-sn,
.sn-right-mc_rev_slide_out.sn-close #tc-sn, .sn-right-mc_rev_slide_out #tc-sn {
	transform: translate3d(-50%, 0, 0);
}

/********************************/
/* Effect 6: Reverse-slide-out */
/******************************/
/* opposite of slide along shares same rules */


/***************************/
/* Effect 7: 3D Rotate in */
/**************************/
/* Two rules shared by effects 7-8-9-10, I used a common prefix: "mc_persp_"*/
[class*=-mc_persp_] #tc-sn {
  perspective: 1500px;
  perspective-origin: 0% 50%;
}
[class*=-mc_persp_] #tc-sn .tc-sn-inner {
  transition: transform 0.5s;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
/* end shared rules with all mc_persp_ */

.sn-close.sn-left-mc_persp_rotate_in #tc-sn .tc-sn-inner,
.sn-left-mc_persp_rotate_in .tc-sn-inner{
  transform: translate3d(-100%,0,0) rotateY(-150deg);
  transform-origin: 100% 50%;
}

.sn-close.sn-right-mc_persp_rotate_in #tc-sn .tc-sn-inner,
.sn-right-mc_persp_rotate_in .tc-sn-inner {
  transform: translate3d(100%,0,0) rotateY(150deg);
  transform-origin: 0 50%;
}
/* shared with rotate out and rotate delay */
.sn-open[class*=mc_persp_rotate_] .tc-sn-inner,
.tc-sn-visible[class*=-mc_persp_rotate_] .tc-sn-inner {
  transform: translate3d(0, 0, 0) rotateY(0deg);
}

/***************************/
/* Effect 8: 3D Rotate out */
/**************************/

.sn-close.sn-left-mc_persp_rotate_out #tc-sn .tc-sn-inner,
.sn-left-mc_persp_rotate_out .tc-sn-inner{
  transform: translate3d(-100%,0,0) rotateY(150deg);
  transform-origin: 100% 50%;
}

.sn-close.sn-right-mc_persp_rotate_out #tc-sn .tc-sn-inner,
.sn-right-mc_persp_rotate_out .tc-sn-inner{
  transform: translate3d(100%,0,0) rotateY(-150deg);
  transform-origin: 0 50%;
}

/***********************/
/* Effect 9: Scale Up */
/*********************/

[class*=-mc_persp_scale_up].sn-open .tc-sn-inner,
.tc-sn-visible[class*=-mc_persp_scale_up] .tc-sn-inner{
  transform: translate3d(0,0,0);
}

[class*=-mc_persp_scale_up].sn-close .tc-sn-inner,
[class*=-mc_persp_scale_up] .tc-sn-inner {
  transform: translate3d(0, 0, -500px);
}

/*********************************/
/* Effect 10: Delayed 3D rotate */
/*******************************/

.sn-close.sn-left-mc_persp_rotate_delay #tc-sn .tc-sn-inner,
.sn-left-mc_persp_rotate_delay .tc-sn-inner {
  transform: translate3d(-50%, 0, 0) rotateY(90deg);
  transform-origin: 0% 50%;

}
.sn-close.sn-right-mc_persp_rotate_delay #tc-sn .tc-sn-inner,
.sn-right-mc_persp_rotate_delay .tc-sn-inner {
  transform: translate3d(50%, 0, 0) rotateY(-90deg);
  transform-origin: 100% 50%;

}
.sn-open[class*=mc_persp_rotate_delay] #tc-sn .tc-sn-inner {
  transition-delay: 0.1s;
  transition-timing-function: ease-in-out;
  transition-property: transform;
}
/* Effects end */

/* HACK */
/* stick the sticky header to the left/right of the page wrapper*/
/* following needed both in mobiles with max-width 400px and in the safari version I tried 6.1.5, since looks fine also in other desktop I left it as general rule*/
/* basically on transition's end in those browsers the sticky header moved to left 0 (or right 0) of the window, overlapping the side menu */
.tc-sticky-header.tc-sn-visible:not(.animating)[class*=-mc_slide_top] .tc-header {
  left: 0 !important;
}

.no-csstransforms3d .tc-sticky-header.tc-sn-visible[class*=-mc_slide_top] .tc-header {
  left: 0 !important;
  right: auto !important;
}
/* MEDIA QUERIES */
@media (max-width: 400px){
  .sn-open[class*=-mc_persp_] {
    z-index: 9999;
  }
}
